Skip to content

Conversation

dzienisz
Copy link
Contributor

@dzienisz dzienisz commented Oct 10, 2025

Add Open Graph Images for Social Media Sharing

platform

Summary

Implemented comprehensive Open Graph (OG) image system with 22 custom branded images across 174 documentation pages to enhance social media sharing with beautiful, branded previews on platforms like Twitter, Facebook, LinkedIn, Discord, and Slack.

Why This Matters

Before: Links shared on social media showed no preview or generic fallback
After: Every documentation page shows a beautiful, branded preview with:

  • Tolgee branding and logo
  • Category-specific badges (e.g., "REACT", "NEXT.JS", "DOCKER")
  • Consistent visual identity
  • Professional appearance

This improves:

  • ✅ Brand consistency across all platforms
  • ✅ Click-through rates from shared links
  • ✅ Professional appearance
  • ✅ User experience when discovering documentation
  • ✅ SEO and social media optimization

What Changed

🎨 New OG Images (22 total)

Core Documentation:

  • homepage.png - Default fallback
  • platform.png - Platform docs
  • js-sdk.png - JavaScript SDK
  • android-sdk.png - Android SDK
  • ios-sdk.png - iOS SDK
  • cli.png - Tolgee CLI
  • api.png - REST API

Framework Integrations:

  • react.png - React
  • react-native.png - React Native
  • vue.png - Vue.js
  • angular.png - Angular
  • svelte.png - Svelte
  • next.png - Next.js
  • vanilla.png - Vanilla JS
  • i18next.png - i18next

Platform Features:

  • integrations.png - Third-party integrations
  • self-hosting.png - Self-hosting guides
  • in-context.png - In-context translation
  • machine-translation.png - AI translation
  • figma-plugin.png - Figma plugin
  • slack.png - Slack integration
  • unreal.png - Unreal Engine plugin

📄 Pages Updated (174 pages - 100% coverage)

  • Platform: 68 pages (getting started, self-hosting, translation process, projects, SSO, formats, integrations)
  • JavaScript SDK: 62 pages (all frameworks, API docs, integrations)
  • Android SDK: 9 pages (core + Jetpack Compose)
  • iOS SDK: 5 pages (complete coverage)
  • CLI: 10 pages (core + extraction docs)

🛠️ Technical Implementation

Configuration:

  • Added global default OG image in docusaurus.config.ts
  • Removed conflicting hardcoded meta tag from LayoutContent.tsx
  • Added image: field to frontmatter of 174 documentation pages

Image Specifications:

  • Format: PNG (1200x630px)
  • Design: Pink-to-magenta gradient (#EC407A → #D81B60)
  • Features: Tolgee logo, category badges, branded borders
  • File size: 71-80KB per image

Automation Scripts:

  • scripts/generateOgImages.ts - Generates SVG templates from config
  • scripts/convertOgImages.ts - Converts SVG to PNG with proper color rendering
  • NPM scripts: npm run generate-og-images, npm run convert-og-images, npm run og-images

Testing

After deployment, verify OG images with:

Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for tolgee-docs ready!

Name Link
🔨 Latest commit 6d81c2c
🔍 Latest deploy log https://app.netlify.com/projects/tolgee-docs/deploys/68ee5ff95fa79200080a1d64
😎 Deploy Preview https://deploy-preview-1032--tolgee-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dzienisz dzienisz force-pushed the feat/docs-og-images branch from 4e61018 to 1f7d7d2 Compare October 10, 2025 14:31
@dzienisz dzienisz self-assigned this Oct 10, 2025
@dzienisz dzienisz force-pushed the feat/docs-og-images branch 4 times, most recently from 9fdbea0 to 533c622 Compare October 13, 2025 16:41
@dzienisz dzienisz requested review from Anty0 and JanCizmar October 13, 2025 16:45
@dzienisz dzienisz force-pushed the feat/docs-og-images branch from 533c622 to b5ada21 Compare October 13, 2025 16:51
@@ -0,0 +1,172 @@
# Frontmatter Examples for OG Images
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file really necessary?

@dzienisz dzienisz force-pushed the feat/docs-og-images branch from b5ada21 to 6d81c2c Compare October 14, 2025 14:36
@dzienisz dzienisz requested a review from JanCizmar October 14, 2025 14:37
@JanCizmar JanCizmar merged commit 058aa68 into main Oct 15, 2025
6 checks passed
@JanCizmar JanCizmar deleted the feat/docs-og-images branch October 15, 2025 15:49
@dzienisz dzienisz removed the request for review from Anty0 October 15, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants